[SPARK-21464][SS] Minimize deprecation warnings caused by ProcessingTime class#18678
Closed
tdas wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-21464][SS] Minimize deprecation warnings caused by ProcessingTime class#18678tdas wants to merge 1 commit intoapache:masterfrom
tdas wants to merge 1 commit intoapache:masterfrom
Conversation
tdas
commented
Jul 19, 2017
| intercept[IllegalArgumentException] { ProcessingTime("invalid") } | ||
| intercept[IllegalArgumentException] { ProcessingTime("1 month") } | ||
| intercept[IllegalArgumentException] { ProcessingTime("1 year") } | ||
| def getIntervalMs(trigger: Trigger): Long = trigger.asInstanceOf[ProcessingTime].intervalMs |
Contributor
Author
There was a problem hiding this comment.
Reduced 10 lines of deprecation warning to 1 line.
|
Test build #79735 has finished for PR 18678 at commit
|
srowen
approved these changes
Jul 19, 2017
Contributor
Author
|
Thanks @srowen merging to master and 2.2 |
asfgit
pushed a commit
that referenced
this pull request
Jul 19, 2017
…ime class ## What changes were proposed in this pull request? Use of `ProcessingTime` class was deprecated in favor of `Trigger.ProcessingTime` in Spark 2.2. However interval uses to ProcessingTime causes deprecation warnings during compilation. This cannot be avoided entirely as even though it is deprecated as a public API, ProcessingTime instances are used internally in TriggerExecutor. This PR is to minimize the warning by removing its uses from tests as much as possible. ## How was this patch tested? Existing tests. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes #18678 from tdas/SPARK-21464. (cherry picked from commit 70fe99d) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
MatthewRBruce
pushed a commit
to Shopify/spark
that referenced
this pull request
Jul 31, 2018
…ime class ## What changes were proposed in this pull request? Use of `ProcessingTime` class was deprecated in favor of `Trigger.ProcessingTime` in Spark 2.2. However interval uses to ProcessingTime causes deprecation warnings during compilation. This cannot be avoided entirely as even though it is deprecated as a public API, ProcessingTime instances are used internally in TriggerExecutor. This PR is to minimize the warning by removing its uses from tests as much as possible. ## How was this patch tested? Existing tests. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes apache#18678 from tdas/SPARK-21464. (cherry picked from commit 70fe99d) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Use of
ProcessingTimeclass was deprecated in favor ofTrigger.ProcessingTimein Spark 2.2. However interval uses to ProcessingTime causes deprecation warnings during compilation. This cannot be avoided entirely as even though it is deprecated as a public API, ProcessingTime instances are used internally in TriggerExecutor. This PR is to minimize the warning by removing its uses from tests as much as possible.How was this patch tested?
Existing tests.